#pragma once

#ifdef USE_SPDLOGGER

#include "core_interface.h"
#include <memory>

class SpdLogger : public ILogger {
public:
    explicit SpdLogger(const std::string& filename = "./logs/log.txt");
    ~SpdLogger() override;

    SpdLogger(const SpdLogger&) = delete;
    SpdLogger& operator=(const SpdLogger&) = delete;
    SpdLogger(SpdLogger&&) noexcept= default;
    SpdLogger& operator=(SpdLogger&&) noexcept= default;

    void log(const std::string& level, const std::string& message) override;
    void set_level(const std::string& level) override;
    void flush() override;

private:
    class Impl;
    std::unique_ptr<Impl> pimpl_;
};

#endif // USE_SPDLOGGER
